package com.wang.mandkey.bean;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.wang.mandkey.R;

public class AdapterCase extends BaseAdapter {

	private Context mContext;
	private List<String> mArrayCase;

	public AdapterCase(Context context,List<String> strlist) {
		  this.mContext=context;
		  this.mArrayCase=strlist;
	}

	@Override
	public int getCount() {
		return mArrayCase.size();
	}

	@Override
	public Object getItem(int position) {
		return position;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {

		View view=null;
		 if(null!=convertView){
			 view=convertView;
		 }else{
			 view=View.inflate(mContext, R.layout.list_view_item, null);
		 }
		 TextView tv=(TextView)view.findViewById(R.id.textViewChractor);
		 tv.setText(this.mArrayCase.get(position));
		return view;
	}

}
